package com.king.designpatterns.设计模式对比.创造型模式对比.工厂方法;

/**
 * @author king
 * @date 2021-06-16 17:01
 */
public class Client {
    public static void main(String[] args) {
        System.out.println("=====创建一个成年超人=====");
        SuperManFactory superManFactory = new AdultSuperManFactory();
        ISuperMan superMan = superManFactory.createSuperMan();
        superMan.specicalTalent();
        System.out.println("=====创建一个未成年超人=====");
        superManFactory = new ChildSuperManFactory();
        superMan = superManFactory.createSuperMan();
        superMan.specicalTalent();
    }
}
